//配置路由的地方
import Vue from 'vue';
import VueRouter from 'vue-router';
//使用插件
Vue.use(VueRouter);
//引用路由组件
import Home from '@/views/Home'

let originPush = VueRouter.prototype.push;
//重写push/replace
VueRouter.prototype.push = function (location, resolve, reject) {
	if (resolve && reject) {
		originPush.call(this, location, resolve, reject);
	} else {
		originPush.call(this, location, () => { }, () => { });
	}
}

//配置路由
let router = new VueRouter({
	routes: [
		{
			path: '/',
			component: () => import('@/views/Home'),
			meta: {
			}
		},
		{
			path: '/home',
			component: Home,
			meta: {
			}
		},
	],
})

export default router;